<!--SIF Implementation Specification 2.2-6 (March 17, 2008)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.sifinfo.org/infrastructure/2.x" xmlns:sif="http://www.sifinfo.org/infrastructure/2.x" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="imports/xml/xml.xsd" />
  <xs:complexType name="ReportManifestType">
    <xs:annotation>
      <xs:documentation>
								This object provides a way to define a report within a SIF zone. It contains metadata about the report. This object
								represents a mutual agreement between senders and receivers of the report.
							</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SIF_Version" type="sif:VersionWithWildcardsType">
        <xs:annotation>
          <xs:documentation>
								Specifies which SIF Implementation Specification version should be used when returning the report data; wildcards are allowed.  When a wildcard is specified,
								the responding agent SHOULD attempt to return the report data in the version specified by SIF_Message/@Version,
								if that version matches the wildcard version.  If not, the responding agent can return the data in any version it chooses that matches the wildcard version.
							</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_MaxBufferSize" type="xs:unsignedInt">
        <xs:annotation>
          <xs:documentation>Specifies the maximum size of a packet to be returned to the report authority.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ReceivingAuthority" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:annotation>
            <xs:documentation>The GUID of the authority for whom the report is intended, usually the same authority that defines this manifest.</xs:documentation>
          </xs:annotation>
          <xs:simpleContent>
            <xs:extension base="sif:IdRefType">
              <xs:attribute name="SIF_RefObject" use="required">
                <xs:annotation>
                  <xs:documentation>The name of the object referenced.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:enumeration value="ReportAuthorityInfo" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="ReportName" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>The authority's accepted name for the report.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" minOccurs="0" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:documentation>The description for the report.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ReportingPeriod" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="BeginReportDate" minOccurs="0" nillable="true" type="xs:date">
              <xs:annotation>
                <xs:documentation>The first date for which the report contains information.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="EndReportDate" minOccurs="0" nillable="true" type="xs:date">
              <xs:annotation>
                <xs:documentation>The last date for which the report contains information. May be the same as BeginReportDate for snapshot-type reports.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="BeginSubmitDate" minOccurs="0" nillable="true" type="xs:date">
              <xs:annotation>
                <xs:documentation>The first date on which the report may be submitted to the authority.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="EndSubmitDate" minOccurs="0" nillable="true" type="xs:date">
              <xs:annotation>
                <xs:documentation>The last date on which the report may be submitted to the authority.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="DueDate" minOccurs="0" nillable="true" type="xs:date">
              <xs:annotation>
                <xs:documentation>The official due date of the report.</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ReportDefinitionSource">
        <xs:annotation>
          <xs:documentation>
								Indicates where the report definition can be found.
								If Type is Embedded or Base64Binary, this element's value contains the report definition.  If Type is
								URL, this element's value is the location of the external definition.  A Type value of SIF_Query
								indicates that the SIF_QueryGroup element contains the definition.
							</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute name="Type" use="required">
                <xs:annotation>
                  <xs:documentation>This attribute indicates the source of the report definition.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:enumeration value="URL" />
                    <xs:enumeration value="Embedded" />
                    <xs:enumeration value="Base64Binary" />
                    <xs:enumeration value="SIF_Query" />
                    <xs:enumeration value="SIF_ExtendedQuery" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
              <xs:attribute name="QueryLanguage" use="required" type="xs:token">
                <xs:annotation>
                  <xs:documentation>
								The vendor-defined query language used in the report definition (e.g. SQL, ExampleObject,
								Description, com.vendor.format, etc.).  If the Type attribute is SIF_Query, then QueryLanguage should also be SIF_Query.
								If the Type attribute is SIF_ExtendedQuery, then QueryLanguage should also be SIF_ExtendedQuery.
							</xs:documentation>
                </xs:annotation>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="ReportFormatList" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ReportFormat" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>A third-party format that describes the visual representation of the report data.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="xs:string">
                    <xs:attribute name="Type" use="required">
                      <xs:annotation>
                        <xs:documentation>This attribute indicates the encoding of the format reference.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:token">
                          <xs:enumeration value="URL" />
                          <xs:enumeration value="Embedded" />
                          <xs:enumeration value="Base64Binary" />
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                    <xs:attribute name="ContentType" use="required" type="xs:normalizedString">
                      <xs:annotation>
                        <xs:documentation>
								The vendor-defined content type (e.g. com.vendor.format, PDF, etc.
							</xs:documentation>
                      </xs:annotation>
                    </xs:attribute>
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_QueryGroup" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SIF_Query" maxOccurs="unbounded" type="sif:SIF_QueryType" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_ExtendedQuery" minOccurs="0" nillable="true" type="sif:SIF_ExtendedQueryType">
        <xs:annotation>
          <xs:documentation>
									Query criteria for extracting the report information if ReportDefinitionSource/@Type
									is SIF_ExtendedQuery.
								</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="sif:SIF_MetadataType" />
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="sif:SIF_ExtendedElementsType" />
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="sif:RefIdType">
      <xs:annotation>
        <xs:documentation>The unique identifier for this report manifest.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="ReportAuthorityInfoRefId" use="required" type="sif:IdRefType">
      <xs:annotation>
        <xs:documentation>ID (GUID) of the authority providing this manifest.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="ReportManifest" type="sif:ReportManifestType" />

</xs:schema>